/**
* Created with CLion.
* User:Lenovo
* Date:2023-05-25
* Time:16:11
* Description:洛谷 P2440  木材加工
*/

#include <stdio.h>
#include <stdbool.h>

#define MAX(a, b) ((a) > (b) ? (a) : (b))

bool check(int length, const int *src, int n, int k)
{
    int count = 0;
    for (int i = 0; i < n; i++)
    {
        count += src[i] / length;
    }

    if (count < k)
    {
        return false;
    }
    else
    {
        return true;
    }
}

int main()
{
    int n, k;
    scanf("%d %d", &n, &k);

    int src[n];
    for (int i = 0; i < n; i++)
    {
        scanf("%d", src + i);
    }

    int r = src[0];
    for (int i = 0; i < n; i++)
    {
        r = MAX(r, src[i]);
    }

    int l = 0;

    while (l < r)
    {
        int mid = (l + r + 1) >> 1;// 如果 l = r - 1，会陷入死循环，所以要加 1
        if (check(mid, src, n, k))
        {
            l = mid;
        }
        else
        {
            r = mid - 1;
        }
    }

    printf("%d", l);

    return 0;
}










